<template>
	<div>
		<van-list
			v-model="loading"
			:finished="finished"
			finished-text="没有更多了"
			@load="onLoad"
		>
			<van-cell v-for="item in list" :key="item.ID" :title="item.Name" @click="chooseItemTypes(item.ID)"/>
		</van-list>
	</div>
</template>

<script>
export default {
	props: {
       	list: {
			type: Array,
			default: () => []
		}
    },
	data() {
		return {
			list: [],
			loading: false,
			finished: false,
		}
	},
    methods:{
        onLoad(){
            	this.loading = false
		setTimeout(() => {
			this.finished = true
		}, 500)
        },
        chooseItemTypes(ItemType){
            console.log(ItemType,'ItemType');
				this.$emit('cb', ItemType)
            // this.$router.push({
            //     name:this.$route.params.path,
            //     params:{
            //         ItemType:ItemType
            //     }
            // })
        }
    }
}
</script>

<style>
</style>